package com.micmac.customer.view.mediator
{
	import com.AppConst;
	import com.micmac.customer.events.CustomerEvent;
	
	import flash.events.Event;
	
	import mx.controls.Alert;
	
	import org.robotlegs.core.IMediator;
	import org.robotlegs.utilities.modular.mvcs.ModuleMediator;
	import com.micmac.customer.view.CustomerPageView;
	
	public class CustomerPageViewMediator extends ModuleMediator
	{
		[Inject]
		public var customerPageView:CustomerPageView;
		
		override public function onRegister():void
		{
			//var testEvent:RegisterEvent = new RegisterEvent(RegisterEvent.REGISTER_CUSTOMER_CONTROLL);
			//dispatchToModules(testEvent);
			//mediatorMap.mapView(CorporationView,CorparationViewMediator)
			addModuleListener(AppConst.TEST_REGISTER,onRegisterHandler,Event);
			//mediatorMap.mapView(CorporationView,CorparationViewMediator,CorporationView);
			
			//mediatorMap.mapView(CorporationView,CorparationViewMediator);
			//mediatorMap.registerMediator(customerPageView.corporationView,CorparationViewMediator as IMediator);
			
		}
		
		private function onRegisterHandler(e:Event):void
		{
			dispatchToModules(new Event(AppConst.TEST_REGISTER2));
		}
		
	}
}